﻿namespace SharpTrainer
{
  public class MyEmployee
  {
    public string Name { get; set; }

    public double Salary { get; set; }

    public MyEmployee()
    {}

    public MyEmployee(string name, double salary)
    {
      Name = name;
      Salary = salary;
    }

    public override string ToString()
    {
        string format = "MyEmployee Name: {0}\nEmployee Salary: {1}\n";

      return string.Format(format, Name, Salary);
    }

    public override bool Equals(object obj)
    {
        MyEmployee emp = obj as MyEmployee;
      if (emp == null)
        return false;
      if (Name == emp.Name && Salary == emp.Salary)
        return true;

      return false;
    }
  }
}
